import java.util.Scanner;

/*
    @author:sa
    @date:2024/11/11 11:00
*/
public class HomeWark01 {
    public static void main(String[] args) {
        System.out.println("请输入用户名");
        Scanner scanner = new Scanner(System.in);
        String userName = scanner.nextLine();
        System.out.println("请输入密码");
        String password = scanner.nextLine();
        boolean b1 = userName.equals("zhangsan");
        boolean b2 = password.equals("123");
        boolean flag = true;
        if (b1 && b2) {
            System.out.println("1.新增2.修改3.删除4.查询5.退出");
            do {
                String choice = scanner.nextLine();
                switch (choice) {
                    case "1":
                        System.out.println("新增");
                        break;
                    case "2":
                        System.out.println("修改");
                        break;
                    case "3":
                        System.out.println("删除");
                        break;
                    case "4":
                        System.out.println("查询");
                        break;
                    case "5":
                        flag = false;
                        System.out.println("退出");
                        break;
                }
            } while (flag);
        }
        else{
                    System.out.println("登录失败");
                }
            }
        }